/**
 * @author xinyang3
 * @descript 属性透传
 * @date 2023-11-03
 */
<template>
    <div>
        <AttrsMyButtonVue class="red" v-on:add="add"></AttrsMyButtonVue>
    {{number}}
    </div>
</template>
<script>
import AttrsMyButtonVue from './AttrsMyButton.vue'
import {ref} from 'vue'
export default {
    components: {
        AttrsMyButtonVue
    },
    setup() {
        let number = ref(0)
        const add = (num) => {
            number.value++
        }

        return {
            number,
            add
        }
    },
}
</script>